﻿using DadayunApi.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DadayunApi.BLL
{
    public class UserInfoBLL
    {
        UserControlApi api = null;
        public UserInfoBLL(AppAuthBase authBase, string baseUri)
        {
            api = new UserControlApi(authBase, baseUri);
        }
        public Login_Info GetLoginInfo()
        {
            return api.GetLoginInfo();
        }
        public List<RoleInfo> GetRoleInfo()
        {
            return api.GetRoleInfo();
        }
        public RoleInfo GetRoleInfo(string id)
        {
            return api.GetRoleInfo(id);
        }
        public List<IdName> GetPositionsOfRole(string roleId, bool withId = false)
        {
            return api.GetPositionsOfRole(roleId, withId);
        }
        public List<IdName> GetUsersOfRole(string roleId, bool withId = false)
        {
            return api.GetUsersOfRole(roleId, withId);
        }
    }
}
